package com.fowo.api.user.model;

import com.fowo.api.common.validator.Phone;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotEmpty;

/**
 * 帐号登录请求
 */
@Schema(title = "帐号登录请求")
@Data
public class LoginAccount {
    public static final String TYPE_MOBILE = "mobile";
    public static final String TYPE_ACCOUNT = "account";

    /**
     * 自动登录
     */
    @Schema(title = "自动登录")
    private Boolean autoLogin;

    @Schema(title = "登录类型", description = "mobile: 手机号短信验证码, account: 用户名密码")
    private String type;

    @Phone
    @Schema(title = "手机号")
    private String mobile;

    @Schema(title = "图片验证码键名")
    private String checkKey;

    @Schema(title = "短信或图片验证码")
    private String captcha;

    @Schema(title = "用户名")
    private String username;

    @Schema(title = "密码")
    private String password;
}
